Developer --> Technical Publications
PATH Hardware Documentation > Device Managers and Drivers > ATA Devices > ATA Device Software Guide


ATA_GetDevConfig

The ATA_GetDevConfig function allows an application to determine what the configuration is for a specified socket.

Some of the fields in this structure are changed or are not valid for ATA Manager 4.0 and later. See the field descriptions section for additional details.

The manager function code for the ATA_GetDevConfig function is $8A.

The parameter block associated with this function is defined as follows:

typedef struct
{
ataPBHdr /* ataPBHdr parameter block */
SInt32 ConfigSetting; /* <--> 32 bits of */
/* configuration information */
UInt8 ataPIOSpeedMode; /* <-- Default PIO mode setting*/
UInt8 Reserved3; /* Reserved for word alignment*/
UInt16 pcValid; /* <-- PCMCIA unique */
UInt16 RWMultipleCount; /* Reserved */
UInt16 SectorsPerCylinder; /* Reserved */
UInt16 Heads; /* Reserved */
UInt16 SectorsPerTrack; /* Reserved */
UInt16 socketNum; /* <-- Socket number */
UInt8 socketType; /* <-- Type of socket */
UInt8 deviceType; /* <-- Type of active device */
UInt8 pcAccessMode; /* <-- Access mode of socket */
UInt8 pcVcc; /* <-- device voltage */
UInt8 pcVpp1; /* <-- Vpp 1 voltage */
UInt8 pcVpp2; /* <-- Vpp 2 voltage */
UInt8 pcStatus; /* <-- Status register setting */
UInt8 pcPin; /* <-- Pin register setting */
UInt8 pcCopy; /* <-- Copy register setting */
UInt8 pcConfigIndex; /* <-- Option register setting */
UInt8 ataSingleDMASpeed; /* <-- Single word DMA */
/* timing class */
UInt8 ataMultiDMASpeed; /* <-- Default Multiword DMA */
/* timing class */
UInt16 ataPIOCycleTime; /* <-- Default cycle time for */
/* PIO mode */
UInt16 ataMultiCycleTime; /* <-- Default cycle time for */
/* multiword DMA mode */
UInt16 Reserved[7]; /* Reserved*/
} ataGetDevConfig;

Field description

ataPBHdr
See the definition of the ataPBHdr parameter block.
ConfigSetting
This 32-bit field contains various device configuration information. In general is it used for features that might be device configurable but which might be know only at the ATA driver level. Bit 6 is the only bit used by ATA Manager 4.0 or later. The bits have the following definitions:
Bits 0-5: Reserved, should be 0
Bit 6: ATAPI packet DRQ handling setting.
0 = Check for assertion of cammand packet DRQ,
this is the default setting.
1 = Check for interrupt DRQ command DRQ.
Bits 7-31:Reserved, must be 0

ataPIOSpeedMode
This field indicates the device access speed value in PIO (polled I/O ) mode currently used for commands and PIO data transfers. This value can be modified with the ATA_SetDevConfig function. In parameter block versions 1 and 2, this field is an integer. In parameter block versions 3 and greater, this field is bit-significant, where the low-order bit indicates that PIO mode 0 is the current mode.
pcValid
This 16-bit field applies to systems that support PCMCIA card services. It indicates which of the PCMCIA unique fields contain valid information. The following values are defined:
bit 0 = when set, the value in the pcAccessMode field is valid
bit 1 = when set, the value in the pcVcc field is valid
bit 2 = when set, the value in the pcVpp1 field is valid
bit 3 = when set, the value in the pcVpp2 field is valid
bit 4 = when set, the value in the pcStatus field is valid
bit 5 = when set, the value in the pcPin field is valid
bit 6 = when set, the value in the pcCopy field is valid
bit 7 = when set, the value in the pcConfigIndex field is valid
bits 14-8 = reserved (set to 0)
bit 15 = reserved
The pcValid field is not supported in ATA Manager 4.0 or later, because the PC Card services are now handled by other system software.
PWMultipleCount
This field is reserved for future use. To ensure future compatibility, all reserved fields should be set to 0.
SectorsPerCylinder
This field is reserved for future use. To ensure future compatibility, all reserved fields should be set to 0.
Heads
This field is reserved for future use. To ensure future compatibility, all reserved fields should be set to 0.
SectorsPerTrack
This field is reserved for future use. To ensure future compatibility, all reserved fields should be set to 0.
socketNum
This field contains the socket number for the device used by the PCMCIA card services. The socket number is required to request card services. A value of 0xFF indicates the device is not a card services client. The socketNum field is not supported in ATA Manager 4.0 or later, because the PC Card services are now handled by other system software.
socketType
This field specifies the type of socket. The values are defined as:
00 = unknown socket type
01 = internal ATA bus ( kATASocketInternal)
02 = media bay socket ( kATASocketMB)
03 = PCMCIA socket ( kATASocketPCMCIA)
deviceType
This field specifies the type of device. The possible values are defined as:
00 = unknown or no device present ( kATADeviceUnknown)
01 = standard ATA device detected ( kATADeviceATA)
02 = ATAPI device detected ( kATADeviceATAPI)
03 = PCMCIA ATA device detected (the 03 value is not returned by ATA Manager 4.0 or later)
pcAccessMode
This field specifies the current mode of the socket. This field is valid only when bit 0 of the pcValid filed is set. The mode values are:
0 = I/O mode
1 = memory mode
The pcAccessMode field is not supported in ATA Manager 4.0 or later.
pcVcc
This field specifies the voltage on Vcc in tenths of a volt. The value in this field is only valid when bit 1 of the pcValid field is set. The pcVcc field is not supported in ATA Manager 4.0 or later, because the PC Card services are now handled by other system software.
pcVpp1
This field specifies the voltage of Vpp1 in tenths of a volt. The value in this field is valid only when bit 2 of the pcValid field is set. The pcVpp1 field is not supported in ATA Manager 4.0 or later, because the PC Card services are now handled by other system software.
pcVpp2
This field specifies the voltage of Vpp2 in tenths of a volt. The value in this field is valid only when bit 3 of the pccValid field is set. The pcVpp2 field is not supported in ATA Manager 4.0 or later, because the PC Card services are now handled by other system software.
pcStatus
This field specifies the current card register setting of a PCMCIA device. The value in this field is valid only when bit 4 of the pccValid field is set. The pcStatus field is not supported in ATA Manager 4.0 or later, because the PC Card services are now handled by other system software.
pcPin
This field specifies the current card pin register setting of a PCMCIA device. The value in this field is valid only when bit 5 of the pccValid field is set. The pcPin field is not supported in ATA Manager 4.0 or later, because the PC Card services are now handled by other system software.
pcCopy
This field specifies the current setting of the card socket/copy register of a PCMCIA device. The value in this field is valid only when bit 6 of the pccValid field is set. The pcCopy field is not supported in ATA Manager 4.0 or later, because the PC Card services are now handled by other system software.
pcConfigIndex
This field specifies the current setting of the card option register of a PCMCIA device. The value in this field is valid only when bit 7 of the pccValid field is set. The pcConfigIndex field is not supported in ATA Manager 4.0 or later, because the PC Card services are now handled by other system software.
ataSingleDMASpeed
This bit-significant field indicates which single word DMA mode, if any, is currently configured for use with DMA transfers. The intitial default value is single word DMA mode 0. The DMA transfer mode may be modified with the ATA_SetDevConfig function. This field is only valid for ATA Manager 3.0 or greater.
ataMultiDMASpeed
This bit-significant field indicates which multiword DMA mode, if any, is currently configured for use with DMA transfers. The intitial default value of this field is 0, which indicates that multiword DMA not selected. The DMA transfer mode may be modified by the ATA_SetDevConfig function. This field is only valid for ATA Manager 3.0 or greater.
ataPIOCycleTime
This word field specifies the minimum cycle time in microseconds of mode 3 or greater PIO transfers. For additional information about the contents of this field, see the ataPIOCycleTime field in the ATA_SetDevConfig function description.
The actual cycle time may be higher than this value if the system hardware is unable to create the requested cycle time while maintaining signal timing for the PIO mode in use. This field is only valid for ATA Manager 3.0 or greater.
ataMultiCycleTime
This word field specifies the minimum cycle time in microseconds of mode 1 or higher multiword DMA data transfers. For additional information about the contents of this field, see the ataMultiCycleTime field in the ATA_SetDevConfig function description.
The actual cycle time may be higher than this value if the system hardware is unable to create the requested cycle time while maintaining signal timing for the multiword DMA mode in use. This field is only valid for ATA Manager 3.0 or greater.
RESULT CODES

See Table A-1 for possible result codes returned by the ATA Manager.


© 1999 Apple Computer, Inc. — (Last Updated 30 Oct 97)

Previous | Back Up One Level | Next | Show Frames | Hide Frames